home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™ 1987-1994 / MacHack™ '90 / Source Code ƒ.sea / Source Code ƒ / Misc. C ƒ / Recorder / Terminal / tloc.p < prev    next >
MacBinary  |  1989-06-27  |  7.0 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Jun 27 13:25:42 1989, modified Tue Jun 27 13:25:42 1989, creator 'MPS ', type ASCII, 4321 bytes "tloc.p" , at 0x1161 2675 bytes resource default (weak)
99% file data default
49% TrID Macintosh plain text (MacBinary) default
33% TrID TTComp archive compressed (bin-4K) default (weak)
16% TrID MacBinary 2 default (weak)
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 06 74 6c 6f 63 2e 70 | 00 00 00 00 00 00 00 00 |..tloc.p|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 78 00 00 00 |.TEXTMPS| ...x...|
|00000050| 00 00 00 00 00 10 e1 00 | 00 0a 73 a0 cd 69 16 a0 |........|..s..i..|
|00000060| cd 69 16 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.i......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 02 d1 00 00 |........|........|
|00000080| 68 65 50 72 6f 63 49 44 | 20 3a 3d 20 28 68 54 65 |heProcID| := (hTe|
|00000090| 72 6d 5e 5e 2e 70 72 6f | 63 49 44 29 3b 0d 09 49 |rm^^.pro|cID);..I|
|000000a0| 46 20 28 74 68 65 50 72 | 6f 63 49 44 20 3c 20 33 |F (thePr|ocID < 3|
|000000b0| 29 20 4f 52 20 28 70 43 | 6f 6e 66 69 67 20 3d 20 |) OR (pC|onfig = |
|000000c0| 4e 49 4c 29 20 4f 52 20 | 28 70 50 72 69 76 61 74 |NIL) OR |(pPrivat|
|000000d0| 65 20 3d 20 4e 49 4c 29 | 20 54 48 45 4e 0d 09 09 |e = NIL)| THEN...|
|000000e0| 44 65 62 75 67 53 74 72 | 28 27 54 68 65 20 70 69 |DebugStr|('The pi|
|000000f0| 70 65 20 69 73 20 62 6c | 6f 63 6b 65 64 20 66 72 |pe is bl|ocked fr|
|00000100| 6f 6d 20 54 65 72 6d 54 | 6f 6f 6c 53 74 72 65 61 |om TermT|oolStrea|
|00000110| 6d 27 29 3b 0d 09 48 53 | 65 74 53 74 61 74 65 28 |m');..HS|etState(|
|00000120| 48 61 6e 64 6c 65 28 68 | 54 65 72 6d 29 2c 20 74 |Handle(h|Term), t|
|00000130| 68 65 53 74 61 74 65 29 | 3b 0d 45 4e 44 3b 0d 0d |heState)|;.END;..|
|00000140| 0d 46 55 4e 43 54 49 4f | 4e 0d 09 54 65 72 6d 54 |.FUNCTIO|N..TermT|
|00000150| 6f 6f 6c 52 65 53 69 7a | 65 28 68 54 65 72 6d 3a |oolReSiz|e(hTerm:|
|00000160| 20 54 65 72 6d 48 61 6e | 64 6c 65 3b 20 70 31 2c | TermHan|dle; p1,|
|00000170| 20 70 32 2c 20 70 33 3a | 20 4c 6f 6e 67 49 6e 74 | p2, p3:| LongInt|
|00000180| 29 3a 20 4c 6f 6e 67 49 | 6e 74 3b 0d 56 41 52 0d |): LongI|nt;.VAR.|
|00000190| 09 74 68 65 53 74 61 74 | 65 3a 20 53 69 67 6e 65 |.theStat|e: Signe|
|000001a0| 64 42 79 74 65 3b 0d 09 | 70 50 72 69 76 61 74 65 |dByte;..|pPrivate|
|000001b0| 3a 20 54 45 52 4d 49 4e | 41 4c 50 72 69 76 61 74 |: TERMIN|ALPrivat|
|000001c0| 65 50 74 72 3b 0d 09 70 | 43 6f 6e 66 69 67 3a 20 |ePtr;..p|Config: |
|000001d0| 54 65 72 6d 69 6e 61 6c | 50 74 72 3b 0d 09 74 68 |Terminal|Ptr;..th|
|000001e0| 65 50 72 6f 63 49 44 3a | 20 49 6e 74 65 67 65 72 |eProcID:| Integer|
|000001f0| 3b 0d 42 45 47 49 4e 0d | 09 74 68 65 53 74 61 74 |;.BEGIN.|.theStat|
|00000200| 65 20 3a 3d 20 48 47 65 | 74 53 74 61 74 65 28 48 |e := HGe|tState(H|
|00000210| 61 6e 64 6c 65 28 68 54 | 65 72 6d 29 29 3b 0d 09 |andle(hT|erm));..|
|00000220| 48 4c 6f 63 6b 28 48 61 | 6e 64 6c 65 28 68 54 65 |HLock(Ha|ndle(hTe|
|00000230| 72 6d 29 29 3b 0d 09 70 | 50 72 69 76 61 74 65 20 |rm));..p|Private |
|00000240| 3a 3d 20 54 45 52 4d 49 | 4e 41 4c 50 72 69 76 61 |:= TERMI|NALPriva|
|00000250| 74 65 50 74 72 28 68 54 | 65 72 6d 5e 5e 2e 74 6d |tePtr(hT|erm^^.tm|
|00000260| 50 72 69 76 61 74 65 29 | 3b 0d 09 70 43 6f 6e 66 |Private)|;..pConf|
|00000270| 69 67 20 3a 3d 20 54 65 | 72 6d 69 6e 61 6c 50 74 |ig := Te|rminalPt|
|00000280| 72 28 68 54 65 72 6d 5e | 5e 2e 63 6f 6e 66 69 67 |r(hTerm^|^.config|
|00000290| 29 3b 0d 09 74 68 65 50 | 72 6f 63 49 44 20 3a 3d |);..theP|rocID :=|
|000002a0| 20 28 68 54 65 72 6d 5e | 5e 2e 70 72 6f 63 49 44 | (hTerm^|^.procID|
|000002b0| 29 3b 0d 09 49 46 20 28 | 74 68 65 50 72 6f 63 49 |);..IF (|theProcI|
|000002c0| 44 20 3c 20 33 29 20 4f | 52 20 28 70 43 6f 6e 66 |D < 3) O|R (pConf|
|000002d0| 69 67 20 3d 20 4e 49 4c | 29 20 4f 52 20 28 70 50 |ig = NIL|) OR (pP|
|000002e0| 72 69 76 61 74 65 20 3d | 20 4e 49 4c 29 20 54 48 |rivate =| NIL) TH|
|000002f0| 45 4e 0d 09 09 44 65 62 | 75 67 53 74 72 28 27 54 |EN...Deb|ugStr('T|
|00000300| 68 65 20 70 69 70 65 20 | 69 73 20 62 6c 6f 63 6b |he pipe |is block|
|00000310| 65 64 20 66 72 6f 6d 20 | 54 65 72 6d 54 6f 6f 6c |ed from |TermTool|
|00000320| 52 65 53 69 7a 65 27 29 | 3b 0d 09 48 53 65 74 53 |ReSize')|;..HSetS|
|00000330| 74 61 74 65 28 48 61 6e | 64 6c 65 28 68 54 65 72 |tate(Han|dle(hTer|
|00000340| 6d 29 2c 20 74 68 65 53 | 74 61 74 65 29 3b 0d 45 |m), theS|tate);.E|
|00000350| 4e 44 3b 0d 0d 0d 46 55 | 4e 43 54 49 4f 4e 0d 09 |ND;...FU|NCTION..|
|00000360| 54 65 72 6d 54 6f 6f 6c | 55 70 64 61 74 65 28 68 |TermTool|Update(h|
|00000370| 54 65 72 6d 3a 20 54 65 | 72 6d 48 61 6e 64 6c 65 |Term: Te|rmHandle|
|00000380| 3b 20 70 31 2c 20 70 32 | 2c 20 70 33 3a 20 4c 6f |; p1, p2|, p3: Lo|
|00000390| 6e 67 49 6e 74 29 3a 20 | 4c 6f 6e 67 49 6e 74 3b |ngInt): |LongInt;|
|000003a0| 0d 56 41 52 0d 09 74 68 | 65 53 74 61 74 65 3a 20 |.VAR..th|eState: |
|000003b0| 53 69 67 6e 65 64 42 79 | 74 65 3b 0d 09 70 50 72 |SignedBy|te;..pPr|
|000003c0| 69 76 61 74 65 3a 20 54 | 45 52 4d 49 4e 41 4c 50 |ivate: T|ERMINALP|
|000003d0| 72 69 76 61 74 65 50 74 | 72 3b 0d 09 70 43 6f 6e |rivatePt|r;..pCon|
|000003e0| 66 69 67 3a 20 54 65 72 | 6d 69 6e 61 6c 50 74 72 |fig: Ter|minalPtr|
|000003f0| 3b 0d 09 74 68 65 50 72 | 6f 63 49 44 3a 20 49 6e |;..thePr|ocID: In|
|00000400| 74 65 67 65 72 3b 0d 42 | 45 47 49 4e 0d 09 74 68 |teger;.B|EGIN..th|
|00000410| 65 53 74 61 74 65 20 3a | 3d 20 48 47 65 74 53 74 |eState :|= HGetSt|
|00000420| 61 74 65 28 48 61 6e 64 | 6c 65 28 68 54 65 72 6d |ate(Hand|le(hTerm|
|00000430| 29 29 3b 0d 09 48 4c 6f | 63 6b 28 48 61 6e 64 6c |));..HLo|ck(Handl|
|00000440| 65 28 68 54 65 72 6d 29 | 29 3b 0d 09 70 50 72 69 |e(hTerm)|);..pPri|
|00000450| 76 61 74 65 20 3a 3d 20 | 54 45 52 4d 49 4e 41 4c |vate := |TERMINAL|
|00000460| 50 72 69 76 61 74 65 50 | 74 72 28 68 54 65 72 6d |PrivateP|tr(hTerm|
|00000470| 5e 5e 2e 74 6d 50 72 69 | 76 61 74 65 29 3b 0d 09 |^^.tmPri|vate);..|
|00000480| 70 43 6f 6e 66 69 67 20 | 3a 3d 20 54 65 72 6d 69 |pConfig |:= Termi|
|00000490| 6e 61 6c 50 74 72 28 68 | 54 65 72 6d 5e 5e 2e 63 |nalPtr(h|Term^^.c|
|000004a0| 6f 6e 66 69 67 29 3b 0d | 09 74 68 65 50 72 6f 63 |onfig);.|.theProc|
|000004b0| 49 44 20 3a 3d 20 28 68 | 54 65 72 6d 5e 5e 2e 70 |ID := (h|Term^^.p|
|000004c0| 72 6f 63 49 44 29 3b 0d | 09 49 46 20 28 74 68 65 |rocID);.|.IF (the|
|000004d0| 50 72 6f 63 49 44 20 3c | 20 33 29 20 4f 52 20 28 |ProcID <| 3) OR (|
|000004e0| 70 43 6f 6e 66 69 67 20 | 3d 20 4e 49 4c 29 20 4f |pConfig |= NIL) O|
|000004f0| 52 20 28 70 50 72 69 76 | 61 74 65 20 3d 20 4e 49 |R (pPriv|ate = NI|
|00000500| 4c 29 20 54 48 45 4e 0d | 09 09 44 65 62 75 67 53 |L) THEN.|..DebugS|
|00000510| 74 72 28 27 54 68 65 20 | 70 69 70 65 20 69 73 20 |tr('The |pipe is |
|00000520| 62 6c 6f 63 6b 65 64 20 | 66 72 6f 6d 20 54 65 72 |blocked |from Ter|
|00000530| 6d 54 6f 6f 6c 55 70 64 | 61 74 65 27 29 3b 0d 09 |mToolUpd|ate');..|
|00000540| 48 53 65 74 53 74 61 74 | 65 28 48 61 6e 64 6c 65 |HSetStat|e(Handle|
|00000550| 28 68 54 65 72 6d 29 2c | 20 74 68 65 53 74 61 74 |(hTerm),| theStat|
|00000560| 65 29 3b 0d 45 4e 44 3b | 0d 0d 0d 46 55 4e 43 54 |e);.END;|...FUNCT|
|00000570| 49 4f 4e 0d 09 54 65 72 | 6d 54 6f 6f 6c 43 6c 69 |ION..Ter|mToolCli|
|00000580| 63 6b 28 68 54 65 72 6d | 3a 20 54 65 72 6d 48 61 |ck(hTerm|: TermHa|
|00000590| 6e 64 6c 65 3b 20 70 31 | 2c 20 70 32 2c 20 70 33 |ndle; p1|, p2, p3|
|000005a0| 3a 20 4c 6f 6e 67 49 6e | 74 29 3a 20 4c 6f 6e 67 |: LongIn|t): Long|
|000005b0| 49 6e 74 3b 0d 56 41 52 | 0d 09 74 68 65 53 74 61 |Int;.VAR|..theSta|
|000005c0| 74 65 3a 20 53 69 67 6e | 65 64 42 79 74 65 3b 0d |te: Sign|edByte;.|
|000005d0| 09 70 50 72 69 76 61 74 | 65 3a 20 54 45 52 4d 49 |.pPrivat|e: TERMI|
|000005e0| 4e 41 4c 50 72 69 76 61 | 74 65 50 74 72 3b 0d 09 |NALPriva|tePtr;..|
|000005f0| 70 43 6f 6e 66 69 67 3a | 20 54 65 72 6d 69 6e 61 |pConfig:| Termina|
|00000600| 6c 50 74 72 3b 0d 09 74 | 68 65 50 72 6f 63 49 44 |lPtr;..t|heProcID|
|00000610| 3a 20 49 6e 74 65 67 65 | 72 3b 0d 42 45 47 49 4e |: Intege|r;.BEGIN|
|00000620| 0d 09 74 68 65 53 74 61 | 74 65 20 3a 3d 20 48 47 |..theSta|te := HG|
|00000630| 65 74 53 74 61 74 65 28 | 48 61 6e 64 6c 65 28 68 |etState(|Handle(h|
|00000640| 54 65 72 6d 29 29 3b 0d | 09 48 4c 6f 63 6b 28 48 |Term));.|.HLock(H|
|00000650| 61 6e 64 6c 65 28 68 54 | 65 72 6d 29 29 3b 0d 09 |andle(hT|erm));..|
|00000660| 70 50 72 69 76 61 74 65 | 20 3a 3d 20 54 45 52 4d |pPrivate| := TERM|
|00000670| 49 4e 41 4c 50 72 69 76 | 61 74 65 50 74 72 28 68 |INALPriv|atePtr(h|
|00000680| 54 65 72 6d 5e 5e 2e 74 | 6d 50 72 69 76 61 74 65 |Term^^.t|mPrivate|
|00000690| 29 3b 0d 09 70 43 6f 6e | 66 69 67 20 3a 3d 20 54 |);..pCon|fig := T|
|000006a0| 65 72 6d 69 6e 61 6c 50 | 74 72 28 68 54 65 72 6d |erminalP|tr(hTerm|
|000006b0| 5e 5e 2e 63 6f 6e 66 69 | 67 29 3b 0d 09 74 68 65 |^^.confi|g);..the|
|000006c0| 50 72 6f 63 49 44 20 3a | 3d 20 28 68 54 65 72 6d |ProcID :|= (hTerm|
|000006d0| 5e 5e 2e 70 72 6f 63 49 | 44 29 3b 0d 09 49 46 20 |^^.procI|D);..IF |
|000006e0| 28 74 68 65 50 72 6f 63 | 49 44 20 3c 20 33 29 20 |(theProc|ID < 3) |
|000006f0| 4f 52 20 28 70 43 6f 6e | 66 69 67 20 3d 20 4e 49 |OR (pCon|fig = NI|
|00000700| 4c 29 20 4f 52 20 28 70 | 50 72 69 76 61 74 65 20 |L) OR (p|Private |
|00000710| 3d 20 4e 49 4c 29 20 54 | 48 45 4e 0d 09 09 44 65 |= NIL) T|HEN...De|
|00000720| 62 75 67 53 74 72 28 27 | 54 68 65 20 70 69 70 65 |bugStr('|The pipe|
|00000730| 20 69 73 20 62 6c 6f 63 | 6b 65 64 20 66 72 6f 6d | is bloc|ked from|
|00000740| 20 54 65 72 6d 54 6f 6f | 6c 43 6c 69 63 6b 27 29 | TermToo|lClick')|
|00000750| 3b 0d 09 48 53 65 74 53 | 74 61 74 65 28 48 61 6e |;..HSetS|tate(Han|
|00000760| 64 6c 65 28 68 54 65 72 | 6d 29 2c 20 74 68 65 53 |dle(hTer|m), theS|
|00000770| 74 61 74 65 29 3b 0d 45 | 4e 44 3b 0d 0d 0d 46 55 |tate);.E|ND;...FU|
|00000780| 4e 43 54 49 4f 4e 0d 09 | 54 65 72 6d 54 6f 6f 6c |NCTION..|TermTool|
|00000790| 47 65 74 53 65 6c 65 63 | 74 69 6f 6e 28 68 54 65 |GetSelec|tion(hTe|
|000007a0| 72 6d 3a 20 54 65 72 6d | 48 61 6e 64 6c 65 3b 20 |rm: Term|Handle; |
|000007b0| 70 31 2c 20 70 32 2c 20 | 70 33 3a 20 4c 6f 6e 67 |p1, p2, |p3: Long|
|000007c0| 49 6e 74 29 3a 20 4c 6f | 6e 67 49 6e 74 3b 0d 56 |Int): Lo|ngInt;.V|
|000007d0| 41 52 0d 09 74 68 65 53 | 74 61 74 65 3a 20 53 69 |AR..theS|tate: Si|
|000007e0| 67 6e 65 64 42 79 74 65 | 3b 0d 09 70 50 72 69 76 |gnedByte|;..pPriv|
|000007f0| 61 74 65 3a 20 54 45 52 | 4d 49 4e 41 4c 50 72 69 |ate: TER|MINALPri|
|00000800| 76 61 74 65 50 74 72 3b | 0d 09 70 43 6f 6e 66 69 |vatePtr;|..pConfi|
|00000810| 67 3a 20 54 65 72 6d 69 | 6e 61 6c 50 74 72 3b 0d |g: Termi|nalPtr;.|
|00000820| 09 74 68 65 50 72 6f 63 | 49 44 3a 20 49 6e 74 65 |.theProc|ID: Inte|
|00000830| 67 65 72 3b 0d 42 45 47 | 49 4e 0d 09 74 68 65 53 |ger;.BEG|IN..theS|
|00000840| 74 61 74 65 20 3a 3d 20 | 48 47 65 74 53 74 61 74 |tate := |HGetStat|
|00000850| 65 28 48 61 6e 64 6c 65 | 28 68 54 65 72 6d 29 29 |e(Handle|(hTerm))|
|00000860| 3b 0d 09 48 4c 6f 63 6b | 28 48 61 6e 64 6c 65 28 |;..HLock|(Handle(|
|00000870| 68 54 65 72 6d 29 29 3b | 0d 09 70 50 72 69 76 61 |hTerm));|..pPriva|
|00000880| 74 65 20 3a 3d 20 54 45 | 52 4d 49 4e 41 4c 50 72 |te := TE|RMINALPr|
|00000890| 69 76 61 74 65 50 74 72 | 28 68 54 65 72 6d 5e 5e |ivatePtr|(hTerm^^|
|000008a0| 2e 74 6d 50 72 69 76 61 | 74 65 29 3b 0d 09 70 43 |.tmPriva|te);..pC|
|000008b0| 6f 6e 66 69 67 20 3a 3d | 20 54 65 72 6d 69 6e 61 |onfig :=| Termina|
|000008c0| 6c 50 74 72 28 68 54 65 | 72 6d 5e 5e 2e 63 6f 6e |lPtr(hTe|rm^^.con|
|000008d0| 66 69 67 29 3b 0d 09 74 | 68 65 50 72 6f 63 49 44 |fig);..t|heProcID|
|000008e0| 20 3a 3d 20 28 68 54 65 | 72 6d 5e 5e 2e 70 72 6f | := (hTe|rm^^.pro|
|000008f0| 63 49 44 29 3b 0d 09 49 | 46 20 28 74 68 65 50 72 |cID);..I|F (thePr|
|00000900| 6f 63 49 44 20 3c 20 33 | 29 20 4f 52 20 28 70 43 |ocID < 3|) OR (pC|
|00000910| 6f 6e 66 69 67 20 3d 20 | 4e 49 4c 29 20 4f 52 20 |onfig = |NIL) OR |
|00000920| 28 70 50 72 69 76 61 74 | 65 20 3d 20 4e 49 4c 29 |(pPrivat|e = NIL)|
|00000930| 20 54 48 45 4e 0d 09 09 | 44 65 62 75 67 53 74 72 | THEN...|DebugStr|
|00000940| 28 27 54 68 65 20 70 69 | 70 65 20 69 73 20 62 6c |('The pi|pe is bl|
|00000950| 6f 63 6b 65 64 20 66 72 | 6f 6d 20 54 65 72 6d 54 |ocked fr|om TermT|
|00000960| 6f 6f 6c 47 65 74 53 65 | 6c 65 63 74 69 6f 6e 27 |oolGetSe|lection'|
|00000970| 29 3b 0d 09 48 53 65 74 | 53 74 61 74 65 28 48 61 |);..HSet|State(Ha|
|00000980| 6e 64 6c 65 28 68 54 65 | 72 6d 29 2c 20 74 68 65 |ndle(hTe|rm), the|
|00000990| 53 74 61 74 65 29 3b 0d | 45 4e 44 3b 0d 0d 0d 46 |State);.|END;...F|
|000009a0| 55 4e 43 54 49 4f 4e 0d | 09 54 65 72 6d 54 6f 6f |UNCTION.|.TermToo|
|000009b0| 6c 53 65 74 53 65 6c 65 | 63 74 69 6f 6e 28 68 54 |lSetSele|ction(hT|
|000009c0| 65 72 6d 3a 20 54 65 72 | 6d 48 61 6e 64 6c 65 3b |erm: Ter|mHandle;|
|000009d0| 20 70 31 2c 20 70 32 2c | 20 70 33 3a 20 4c 6f 6e | p1, p2,| p3: Lon|
|000009e0| 67 49 6e 74 29 3a 20 4c | 6f 6e 67 49 6e 74 3b 0d |gInt): L|ongInt;.|
|000009f0| 56 41 52 0d 09 74 68 65 | 53 74 61 74 65 3a 20 53 |VAR..the|State: S|
|00000a00| 69 67 6e 65 64 42 79 74 | 65 3b 0d 09 70 50 72 69 |ignedByt|e;..pPri|
|00000a10| 76 61 74 65 3a 20 54 45 | 52 4d 49 4e 41 4c 50 72 |vate: TE|RMINALPr|
|00000a20| 69 76 61 74 65 50 74 72 | 3b 0d 09 70 43 6f 6e 66 |ivatePtr|;..pConf|
|00000a30| 69 67 3a 20 54 65 72 6d | 69 6e 61 6c 50 74 72 3b |ig: Term|inalPtr;|
|00000a40| 0d 09 74 68 65 50 72 6f | 63 49 44 3a 20 49 6e 74 |..thePro|cID: Int|
|00000a50| 65 67 65 72 3b 0d 42 45 | 47 49 4e 0d 09 74 68 65 |eger;.BE|GIN..the|
|00000a60| 53 74 61 74 65 20 3a 3d | 20 48 47 65 74 53 74 61 |State :=| HGetSta|
|00000a70| 74 65 28 48 61 6e 64 6c | 65 28 68 54 65 72 6d 29 |te(Handl|e(hTerm)|
|00000a80| 29 3b 0d 09 48 4c 6f 63 | 6b 28 48 61 6e 64 6c 65 |);..HLoc|k(Handle|
|00000a90| 28 68 54 65 72 6d 29 29 | 3b 0d 09 70 50 72 69 76 |(hTerm))|;..pPriv|
|00000aa0| 61 74 65 20 3a 3d 20 54 | 45 52 4d 49 4e 41 4c 50 |ate := T|ERMINALP|
|00000ab0| 72 69 76 61 74 65 50 74 | 72 28 68 54 65 72 6d 5e |rivatePt|r(hTerm^|
|00000ac0| 5e 2e 74 6d 50 72 69 76 | 61 74 65 29 3b 0d 09 70 |^.tmPriv|ate);..p|
|00000ad0| 43 6f 6e 66 69 67 20 3a | 3d 20 54 65 72 6d 69 6e |Config :|= Termin|
|00000ae0| 61 6c 50 74 72 28 68 54 | 65 72 6d 5e 5e 2e 63 6f |alPtr(hT|erm^^.co|
|00000af0| 6e 66 69 67 29 3b 0d 09 | 74 68 65 50 72 6f 63 49 |nfig);..|theProcI|
|00000b00| 44 20 3a 3d 20 28 68 54 | 65 72 6d 5e 5e 2e 70 72 |D := (hT|erm^^.pr|
|00000b10| 6f 63 49 44 29 3b 0d 09 | 49 46 20 28 74 68 65 50 |ocID);..|IF (theP|
|00000b20| 72 6f 63 49 44 20 3c 20 | 33 29 20 4f 52 20 28 70 |rocID < |3) OR (p|
|00000b30| 43 6f 6e 66 69 67 20 3d | 20 4e 49 4c 29 20 4f 52 |Config =| NIL) OR|
|00000b40| 20 28 70 50 72 69 76 61 | 74 65 20 3d 20 4e 49 4c | (pPriva|te = NIL|
|00000b50| 29 20 54 48 45 4e 0d 09 | 09 44 65 62 75 67 53 74 |) THEN..|.DebugSt|
|00000b60| 72 28 27 54 68 65 20 70 | 69 70 65 20 69 73 20 62 |r('The p|ipe is b|
|00000b70| 6c 6f 63 6b 65 64 20 66 | 72 6f 6d 20 54 65 72 6d |locked f|rom Term|
|00000b80| 54 6f 6f 6c 53 65 74 53 | 65 6c 65 63 74 69 6f 6e |ToolSetS|election|
|00000b90| 27 29 3b 0d 09 48 53 65 | 74 53 74 61 74 65 28 48 |');..HSe|tState(H|
|00000ba0| 61 6e 64 6c 65 28 68 54 | 65 72 6d 29 2c 20 74 68 |andle(hT|erm), th|
|00000bb0| 65 53 74 61 74 65 29 3b | 0d 45 4e 44 3b 0d 0d 0d |eState);|.END;...|
|00000bc0| 46 55 4e 43 54 49 4f 4e | 0d 09 54 65 72 6d 54 6f |FUNCTION|..TermTo|
|00000bd0| 6f 6c 53 63 72 6f 6c 6c | 28 68 54 65 72 6d 3a 20 |olScroll|(hTerm: |
|00000be0| 54 65 72 6d 48 61 6e 64 | 6c 65 3b 20 70 31 2c 20 |TermHand|le; p1, |
|00000bf0| 70 32 2c 20 70 33 3a 20 | 4c 6f 6e 67 49 6e 74 29 |p2, p3: |LongInt)|
|00000c00| 3a 20 4c 6f 6e 67 49 6e | 74 3b 0d 56 41 52 0d 09 |: LongIn|t;.VAR..|
|00000c10| 74 68 65 53 74 61 74 65 | 3a 20 53 69 67 6e 65 64 |theState|: Signed|
|00000c20| 42 79 74 65 3b 0d 09 70 | 50 72 69 76 61 74 65 3a |Byte;..p|Private:|
|00000c30| 20 54 45 52 4d 49 4e 41 | 4c 50 72 69 76 61 74 65 | TERMINA|LPrivate|
|00000c40| 50 74 72 3b 0d 09 70 43 | 6f 6e 66 69 67 3a 20 54 |Ptr;..pC|onfig: T|
|00000c50| 65 72 6d 69 6e 61 6c 50 | 74 72 3b 0d 09 74 68 65 |erminalP|tr;..the|
|00000c60| 50 72 6f 63 49 44 3a 20 | 49 6e 74 65 67 65 72 3b |ProcID: |Integer;|
|00000c70| 0d 42 45 47 49 4e 0d 09 | 74 68 65 53 74 61 74 65 |.BEGIN..|theState|
|00000c80| 20 3a 3d 20 48 47 65 74 | 53 74 61 74 65 28 48 61 | := HGet|State(Ha|
|00000c90| 6e 64 6c 65 28 68 54 65 | 72 6d 29 29 3b 0d 09 48 |ndle(hTe|rm));..H|
|00000ca0| 4c 6f 63 6b 28 48 61 6e | 64 6c 65 28 68 54 65 72 |Lock(Han|dle(hTer|
|00000cb0| 6d 29 29 3b 0d 09 70 50 | 72 69 76 61 74 65 20 3a |m));..pP|rivate :|
|00000cc0| 3d 20 54 45 52 4d 49 4e | 41 4c 50 72 69 76 61 74 |= TERMIN|ALPrivat|
|00000cd0| 65 50 74 72 28 68 54 65 | 72 6d 5e 5e 2e 74 6d 50 |ePtr(hTe|rm^^.tmP|
|00000ce0| 72 69 76 61 74 65 29 3b | 0d 09 70 43 6f 6e 66 69 |rivate);|..pConfi|
|00000cf0| 67 20 3a 3d 20 54 65 72 | 6d 69 6e 61 6c 50 74 72 |g := Ter|minalPtr|
|00000d00| 28 68 54 65 72 6d 5e 5e | 2e 63 6f 6e 66 69 67 29 |(hTerm^^|.config)|
|00000d10| 3b 0d 09 74 68 65 50 72 | 6f 63 49 44 20 3a 3d 20 |;..thePr|ocID := |
|00000d20| 28 68 54 65 72 6d 5e 5e | 2e 70 72 6f 63 49 44 29 |(hTerm^^|.procID)|
|00000d30| 3b 0d 09 49 46 20 28 74 | 68 65 50 72 6f 63 49 44 |;..IF (t|heProcID|
|00000d40| 20 3c 20 33 29 20 4f 52 | 20 28 70 43 6f 6e 66 69 | < 3) OR| (pConfi|
|00000d50| 67 20 3d 20 4e 49 4c 29 | 20 4f 52 20 28 70 50 72 |g = NIL)| OR (pPr|
|00000d60| 69 76 61 74 65 20 3d 20 | 4e 49 4c 29 20 54 48 45 |ivate = |NIL) THE|
|00000d70| 4e 0d 09 09 44 65 62 75 | 67 53 74 72 28 27 54 68 |N...Debu|gStr('Th|
|00000d80| 65 20 70 69 70 65 20 69 | 73 20 62 6c 6f 63 6b 65 |e pipe i|s blocke|
|00000d90| 64 20 66 72 6f 6d 20 54 | 65 72 6d 54 6f 6f 6c 53 |d from T|ermToolS|
|00000da0| 63 72 6f 6c 6c 27 29 3b | 0d 09 48 53 65 74 53 74 |croll');|..HSetSt|
|00000db0| 61 74 65 28 48 61 6e 64 | 6c 65 28 68 54 65 72 6d |ate(Hand|le(hTerm|
|00000dc0| 29 2c 20 74 68 65 53 74 | 61 74 65 29 3b 0d 45 4e |), theSt|ate);.EN|
|00000dd0| 44 3b 0d 0d 0d 46 55 4e | 43 54 49 4f 4e 0d 09 54 |D;...FUN|CTION..T|
|00000de0| 65 72 6d 54 6f 6f 6c 43 | 6c 65 61 72 28 68 54 65 |ermToolC|lear(hTe|
|00000df0| 72 6d 3a 20 54 65 72 6d | 48 61 6e 64 6c 65 29 3a |rm: Term|Handle):|
|00000e00| 20 4c 6f 6e 67 49 6e 74 | 3b 0d 56 41 52 0d 09 74 | LongInt|;.VAR..t|
|00000e10| 68 65 53 74 61 74 65 3a | 20 53 69 67 6e 65 64 42 |heState:| SignedB|
|00000e20| 79 74 65 3b 0d 09 70 50 | 72 69 76 61 74 65 3a 20 |yte;..pP|rivate: |
|00000e30| 54 45 52 4d 49 4e 41 4c | 50 72 69 76 61 74 65 50 |TERMINAL|PrivateP|
|00000e40| 74 72 3b 0d 09 70 43 6f | 6e 66 69 67 3a 20 54 65 |tr;..pCo|nfig: Te|
|00000e50| 72 6d 69 6e 61 6c 50 74 | 72 3b 0d 09 74 68 65 50 |rminalPt|r;..theP|
|00000e60| 72 6f 63 49 44 3a 20 49 | 6e 74 65 67 65 72 3b 0d |rocID: I|nteger;.|
|00000e70| 42 45 47 49 4e 0d 09 74 | 68 65 53 74 61 74 65 20 |BEGIN..t|heState |
|00000e80| 3a 3d 20 48 47 65 74 53 | 74 61 74 65 28 48 61 6e |:= HGetS|tate(Han|
|00000e90| 64 6c 65 28 68 54 65 72 | 6d 29 29 3b 0d 09 48 4c |dle(hTer|m));..HL|
|00000ea0| 6f 63 6b 28 48 61 6e 64 | 6c 65 28 68 54 65 72 6d |ock(Hand|le(hTerm|
|00000eb0| 29 29 3b 0d 09 70 50 72 | 69 76 61 74 65 20 3a 3d |));..pPr|ivate :=|
|00000ec0| 20 54 45 52 4d 49 4e 41 | 4c 50 72 69 76 61 74 65 | TERMINA|LPrivate|
|00000ed0| 50 74 72 28 68 54 65 72 | 6d 5e 5e 2e 74 6d 50 72 |Ptr(hTer|m^^.tmPr|
|00000ee0| 69 76 61 74 65 29 3b 0d | 09 70 43 6f 6e 66 69 67 |ivate);.|.pConfig|
|00000ef0| 20 3a 3d 20 54 65 72 6d | 69 6e 61 6c 50 74 72 28 | := Term|inalPtr(|
|00000f00| 68 54 65 72 6d 5e 5e 2e | 63 6f 6e 66 69 67 29 3b |hTerm^^.|config);|
|00000f10| 0d 09 74 68 65 50 72 6f | 63 49 44 20 3a 3d 20 28 |..thePro|cID := (|
|00000f20| 68 54 65 72 6d 5e 5e 2e | 70 72 6f 63 49 44 29 3b |hTerm^^.|procID);|
|00000f30| 0d 09 49 46 20 28 74 68 | 65 50 72 6f 63 49 44 20 |..IF (th|eProcID |
|00000f40| 3c 20 33 29 20 4f 52 20 | 28 70 43 6f 6e 66 69 67 |< 3) OR |(pConfig|
|00000f50| 20 3d 20 4e 49 4c 29 20 | 4f 52 20 28 70 50 72 69 | = NIL) |OR (pPri|
|00000f60| 76 61 74 65 20 3d 20 4e | 49 4c 29 20 54 48 45 4e |vate = N|IL) THEN|
|00000f70| 0d 09 09 44 65 62 75 67 | 53 74 72 28 27 54 68 65 |...Debug|Str('The|
|00000f80| 20 70 69 70 65 20 69 73 | 20 62 6c 6f 63 6b 65 64 | pipe is| blocked|
|00000f90| 20 66 72 6f 6d 20 54 65 | 72 6d 54 6f 6f 6c 43 6c | from Te|rmToolCl|
|00000fa0| 65 61 72 27 29 3b 0d 09 | 48 53 65 74 53 74 61 74 |ear');..|HSetStat|
|00000fb0| 65 28 48 61 6e 64 6c 65 | 28 68 54 65 72 6d 29 2c |e(Handle|(hTerm),|
|00000fc0| 20 74 68 65 53 74 61 74 | 65 29 3b 0d 45 4e 44 3b | theStat|e);.END;|
|00000fd0| 0d 0d 0d 46 55 4e 43 54 | 49 4f 4e 0d 09 54 65 72 |...FUNCT|ION..Ter|
|00000fe0| 6d 54 6f 6f 6c 47 65 74 | 4c 69 6e 65 28 68 54 65 |mToolGet|Line(hTe|
|00000ff0| 72 6d 3a 20 54 65 72 6d | 48 61 6e 64 6c 65 3b 20 |rm: Term|Handle; |
|00001000| 70 31 2c 20 70 32 2c 20 | 70 33 3a 20 4c 6f 6e 67 |p1, p2, |p3: Long|
|00001010| 49 6e 74 29 3a 20 4c 6f | 6e 67 49 6e 74 3b 0d 56 |Int): Lo|ngInt;.V|
|00001020| 41 52 0d 09 74 68 65 53 | 74 61 74 65 3a 20 53 69 |AR..theS|tate: Si|
|00001030| 67 6e 65 64 42 79 74 65 | 3b 0d 09 70 50 72 69 76 |gnedByte|;..pPriv|
|00001040| 61 74 65 3a 20 54 45 52 | 4d 49 4e 41 4c 50 72 69 |ate: TER|MINALPri|
|00001050| 76 61 74 65 50 74 72 3b | 0d 09 70 43 6f 6e 66 69 |vatePtr;|..pConfi|
|00001060| 67 3a 20 54 65 72 6d 69 | 6e 61 6c 50 74 72 3b 0d |g: Termi|nalPtr;.|
|00001070| 09 74 68 65 50 72 6f 63 | 49 44 3a 20 49 6e 74 65 |.theProc|ID: Inte|
|00001080| 67 65 72 3b 0d 42 45 47 | 49 4e 0d 09 74 68 65 53 |ger;.BEG|IN..theS|
|00001090| 74 61 74 65 20 3a 3d 20 | 48 47 65 74 53 74 61 74 |tate := |HGetStat|
|000010a0| 65 28 48 61 6e 64 6c 65 | 28 68 54 65 72 6d 29 29 |e(Handle|(hTerm))|
|000010b0| 3b 0d 09 48 4c 6f 63 6b | 28 48 61 6e 64 6c 65 28 |;..HLock|(Handle(|
|000010c0| 68 54 65 72 6d 29 29 3b | 0d 09 70 50 72 69 76 61 |hTerm));|..pPriva|
|000010d0| 74 65 20 3a 3d 20 54 45 | 52 4d 49 4e 41 4c 50 72 |te := TE|RMINALPr|
|000010e0| 69 76 61 74 65 50 74 72 | 28 68 54 65 72 6d 5e 5e |ivatePtr|(hTerm^^|
|000010f0| 2e 74 6d 50 72 69 76 61 | 74 65 29 3b 0d 09 70 43 |.tmPriva|te);..pC|
|00001100| 6f 6e 66 69 67 20 3a 3d | 20 54 65 72 6d 69 6e 61 |onfig :=| Termina|
|00001110| 6c 50 74 72 28 68 54 65 | 72 6d 5e 5e 2e 63 6f 6e |lPtr(hTe|rm^^.con|
|00001120| 66 69 67 29 3b 0d 09 74 | 68 65 50 72 6f 63 49 44 |fig);..t|heProcID|
|00001130| 20 3a 3d 20 28 68 54 65 | 72 6d 5e 5e 2e 70 72 6f | := (hTe|rm^^.pro|
|00001140| 63 49 44 29 3b 0d 09 49 | 46 20 28 74 68 65 50 72 |cID);..I|F (thePr|
|00001150| 6f 63 49 44 20 3c 20 33 | 29 20 4f 52 20 28 70 43 |ocID < 3|) OR (pC|
|00001160| 6f 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |o.......|........|
|00001170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001180| 49 4e 41 4c 50 72 69 76 | 61 74 65 50 74 72 28 68 |INALPriv|atePtr(h|
|00001190| 54 65 72 6d 5e 5e 2e 74 | 6d 50 72 69 76 61 74 65 |Term^^.t|mPrivate|
|000011a0| 29 3b 0d 09 70 43 6f 6e | 66 69 67 20 3a 3d 20 54 |);..pCon|fig := T|
|000011b0| 65 72 6d 69 6e 61 6c 50 | 74 72 28 68 54 65 72 6d |erminalP|tr(hTerm|
|000011c0| 5e 5e 2e 63 6f 6e 66 69 | 67 29 3b 0d 09 74 68 65 |^^.confi|g);..the|
|000011d0| 50 72 6f 63 49 44 20 3a | 3d 20 28 68 54 65 72 6d |ProcID :|= (hTerm|
|000011e0| 5e 5e 2e 70 72 6f 63 49 | 44 29 3b 0d 09 49 46 20 |^^.procI|D);..IF |
|000011f0| 28 74 68 65 50 72 6f 63 | 49 44 20 3c 20 33 29 20 |(theProc|ID < 3) |
|00001200| 4f 52 20 28 70 43 6f 6e | 66 69 67 20 3d 20 4e 49 |OR (pCon|fig = NI|
|00001210| 4c 29 20 4f 52 20 28 70 | 50 72 69 76 61 74 65 20 |L) OR (p|Private |
|00001220| 3d 20 4e 49 4c 29 20 54 | 48 45 4e 0d 09 09 44 65 |= NIL) T|HEN...De|
|00001230| 62 75 67 53 74 72 28 27 | 54 68 65 20 70 69 70 65 |bugStr('|The pipe|
|00001240| 20 69 73 20 62 6c 6f 63 | 6b 65 64 20 66 72 6f 6d | is bloc|ked from|
|00001250| 20 54 65 72 6d 54 6f 6f | 6c 4d 65 6e 75 27 29 3b | TermToo|lMenu');|
|00001260| 0d 09 48 53 65 74 53 74 | 61 74 65 28 48 61 6e 64 |..HSetSt|ate(Hand|
|00001270| 6c 65 28 68 54 65 72 6d | 29 2c 20 74 68 65 53 74 |le(hTerm|), theSt|
|00001280| 61 74 65 29 3b 0d 45 4e | 44 3b 0d 0d 0d 46 55 4e |ate);.EN|D;...FUN|
|00001290| 43 54 49 4f 4e 0d 09 54 | 65 72 6d 54 6f 6f 6c 45 |CTION..T|ermToolE|
|000012a0| 76 65 6e 74 28 68 54 65 | 72 6d 3a 20 54 65 72 6d |vent(hTe|rm: Term|
|000012b0| 48 61 6e 64 6c 65 29 3a | 20 4c 6f 6e 67 49 6e 74 |Handle):| LongInt|
|000012c0| 3b 0d 56 41 52 0d 09 74 | 68 65 53 74 61 74 65 3a |;.VAR..t|heState:|
|000012d0| 20 53 69 67 6e 65 64 42 | 79 74 65 3b 0d 09 70 50 | SignedB|yte;..pP|
|000012e0| 72 69 76 61 74 65 3a 20 | 54 45 52 4d 49 4e 41 4c |rivate: |TERMINAL|
|000012f0| 50 72 69 76 61 74 65 50 | 74 72 3b 0d 09 70 43 6f |PrivateP|tr;..pCo|
|00001300| 6e 66 69 67 3a 20 54 65 | 72 6d 69 6e 61 6c 50 74 |nfig: Te|rminalPt|
|00001310| 72 3b 0d 09 74 68 65 50 | 72 6f 63 49 44 3a 20 49 |r;..theP|rocID: I|
|00001320| 6e 74 65 67 65 72 3b 0d | 42 45 47 49 4e 0d 09 74 |nteger;.|BEGIN..t|
|00001330| 68 65 53 74 61 74 65 20 | 3a 3d 20 48 47 65 74 53 |heState |:= HGetS|
|00001340| 74 61 74 65 28 48 61 6e | 64 6c 65 28 68 54 65 72 |tate(Han|dle(hTer|
|00001350| 6d 29 29 3b 0d 09 48 4c | 6f 63 6b 28 48 61 6e 64 |m));..HL|ock(Hand|
|00001360| 6c 65 28 68 54 65 72 6d | 29 29 3b 0d 09 70 50 72 |le(hTerm|));..pPr|
|00001370| 69 76 61 74 65 20 3a 3d | 20 54 45 52 4d 49 4e 41 |ivate :=| TERMINA|
|00001380| 4c 50 72 69 76 61 74 65 | 50 74 72 28 68 54 65 72 |LPrivate|Ptr(hTer|
|00001390| 6d 5e 5e 2e 74 6d 50 72 | 69 76 61 74 65 29 3b 0d |m^^.tmPr|ivate);.|
|000013a0| 09 70 43 6f 6e 66 69 67 | 20 3a 3d 20 54 65 72 6d |.pConfig| := Term|
|000013b0| 69 6e 61 6c 50 74 72 28 | 68 54 65 72 6d 5e 5e 2e |inalPtr(|hTerm^^.|
|000013c0| 63 6f 6e 66 69 67 29 3b | 0d 09 74 68 65 50 72 6f |config);|..thePro|
|000013d0| 63 49 44 20 3a 3d 20 28 | 68 54 65 72 6d 5e 5e 2e |cID := (|hTerm^^.|
|000013e0| 70 72 6f 63 49 44 29 3b | 0d 09 49 46 20 28 74 68 |procID);|..IF (th|
|000013f0| 65 50 72 6f 63 49 44 20 | 3c 20 33 29 20 4f 52 20 |eProcID |< 3) OR |
|00001400| 28 70 43 6f 6e 66 69 67 | 20 3d 20 4e 49 4c 29 20 |(pConfig| = NIL) |
|00001410| 4f 52 20 28 70 50 72 69 | 76 61 74 65 20 3d 20 4e |OR (pPri|vate = N|
|00001420| 49 4c 29 20 54 48 45 4e | 0d 09 09 44 65 62 75 67 |IL) THEN|...Debug|
|00001430| 53 74 72 28 27 54 68 65 | 20 70 69 70 65 20 69 73 |Str('The| pipe is|
|00001440| 20 62 6c 6f 63 6b 65 64 | 20 66 72 6f 6d 20 54 65 | blocked| from Te|
|00001450| 72 6d 54 6f 6f 6c 45 76 | 65 6e 74 27 29 3b 0d 09 |rmToolEv|ent');..|
|00001460| 48 53 65 74 53 74 61 74 | 65 28 48 61 6e 64 6c 65 |HSetStat|e(Handle|
|00001470| 28 68 54 65 72 6d 29 2c | 20 74 68 65 53 74 61 74 |(hTerm),| theStat|
|00001480| 65 29 3b 0d 45 4e 44 3b | 0d 0d 0d 46 55 4e 43 54 |e);.END;|...FUNCT|
|00001490| 49 4f 4e 0d 09 54 65 72 | 6d 54 6f 6f 6c 49 64 6c |ION..Ter|mToolIdl|
|000014a0| 65 28 68 54 65 72 6d 3a | 20 54 65 72 6d 48 61 6e |e(hTerm:| TermHan|
|000014b0| 64 6c 65 29 3a 20 4c 6f | 6e 67 49 6e 74 3b 0d 56 |dle): Lo|ngInt;.V|
|000014c0| 41 52 0d 09 74 68 65 53 | 74 61 74 65 3a 20 53 69 |AR..theS|tate: Si|
|000014d0| 67 6e 65 64 42 79 74 65 | 3b 0d 09 70 50 72 69 76 |gnedByte|;..pPriv|
|000014e0| 61 74 65 3a 20 54 45 52 | 4d 49 4e 41 4c 50 72 69 |ate: TER|MINALPri|
|000014f0| 76 61 74 65 50 74 72 3b | 0d 09 70 43 6f 6e 66 69 |vatePtr;|..pConfi|
|00001500| 67 3a 20 54 65 72 6d 69 | 6e 61 6c 50 74 72 3b 0d |g: Termi|nalPtr;.|
|00001510| 09 74 68 65 50 72 6f 63 | 49 44 3a 20 49 6e 74 65 |.theProc|ID: Inte|
|00001520| 67 65 72 3b 0d 42 45 47 | 49 4e 0d 09 74 68 65 53 |ger;.BEG|IN..theS|
|00001530| 74 61 74 65 20 3a 3d 20 | 48 47 65 74 53 74 61 74 |tate := |HGetStat|
|00001540| 65 28 48 61 6e 64 6c 65 | 28 68 54 65 72 6d 29 29 |e(Handle|(hTerm))|
|00001550| 3b 0d 09 48 4c 6f 63 6b | 28 48 61 6e 64 6c 65 28 |;..HLock|(Handle(|
|00001560| 68 54 65 72 6d 29 29 3b | 0d 09 70 50 72 69 76 61 |hTerm));|..pPriva|
|00001570| 74 65 20 3a 3d 20 54 45 | 52 4d 49 4e 41 4c 50 72 |te := TE|RMINALPr|
|00001580| 69 76 61 74 65 50 74 72 | 28 68 54 65 72 6d 5e 5e |ivatePtr|(hTerm^^|
|00001590| 2e 74 6d 50 72 69 76 61 | 74 65 29 3b 0d 09 70 43 |.tmPriva|te);..pC|
|000015a0| 6f 6e 66 69 67 20 3a 3d | 20 54 65 72 6d 69 6e 61 |onfig :=| Termina|
|000015b0| 6c 50 74 72 28 68 54 65 | 72 6d 5e 5e 2e 63 6f 6e |lPtr(hTe|rm^^.con|
|000015c0| 66 69 67 29 3b 0d 09 74 | 68 65 50 72 6f 63 49 44 |fig);..t|heProcID|
|000015d0| 20 3a 3d 20 28 68 54 65 | 72 6d 5e 5e 2e 70 72 6f | := (hTe|rm^^.pro|
|000015e0| 63 49 44 29 3b 0d 09 49 | 46 20 28 74 68 65 50 72 |cID);..I|F (thePr|
|000015f0| 6f 63 49 44 20 3c 20 33 | 29 20 4f 52 20 28 70 43 |ocID < 3|) OR (pC|
|00001600| 6f 6e 66 69 67 20 3d 20 | 4e 49 4c 29 20 4f 52 20 |onfig = |NIL) OR |
|00001610| 28 70 50 72 69 76 61 74 | 65 20 3d 20 4e 49 4c 29 |(pPrivat|e = NIL)|
|00001620| 20 54 48 45 4e 0d 09 09 | 44 65 62 75 67 53 74 72 | THEN...|DebugStr|
|00001630| 28 27 54 68 65 20 70 69 | 70 65 20 69 73 20 62 6c |('The pi|pe is bl|
|00001640| 6f 63 6b 65 64 20 66 72 | 6f 6d 20 54 65 72 6d 54 |ocked fr|om TermT|
|00001650| 6f 6f 6c 49 64 6c 65 27 | 29 3b 0d 09 48 53 65 74 |oolIdle'|);..HSet|
|00001660| 53 74 61 74 65 28 48 61 | 6e 64 6c 65 28 68 54 65 |State(Ha|ndle(hTe|
|00001670| 72 6d 29 2c 20 74 68 65 | 53 74 61 74 65 29 3b 0d |rm), the|State);.|
|00001680| 45 4e 44 3b 0d 0d 0d 46 | 55 4e 43 54 49 4f 4e 0d |END;...F|UNCTION.|
|00001690| 09 54 65 72 6d 54 6f 6f | 6c 52 65 73 65 74 28 68 |.TermToo|lReset(h|
|000016a0| 54 65 72 6d 3a 20 54 65 | 72 6d 48 61 6e 64 6c 65 |Term: Te|rmHandle|
|000016b0| 29 3a 20 4c 6f 6e 67 49 | 6e 74 3b 0d 56 41 52 0d |): LongI|nt;.VAR.|
|000016c0| 09 74 68 65 53 74 61 74 | 65 3a 20 53 69 67 6e 65 |.theStat|e: Signe|
|000016d0| 64 42 79 74 65 3b 0d 09 | 70 50 72 69 76 61 74 65 |dByte;..|pPrivate|
|000016e0| 3a 20 54 45 52 4d 49 4e | 41 4c 50 72 69 76 61 74 |: TERMIN|ALPrivat|
|000016f0| 65 50 74 72 3b 0d 09 70 | 43 6f 6e 66 69 67 3a 20 |ePtr;..p|Config: |
|00001700| 54 65 72 6d 69 6e 61 6c | 50 74 72 3b 0d 09 74 68 |Terminal|Ptr;..th|
|00001710| 65 50 72 6f 63 49 44 3a | 20 49 6e 74 65 67 65 72 |eProcID:| Integer|
|00001720| 3b 0d 42 45 47 49 4e 0d | 09 74 68 65 53 74 61 74 |;.BEGIN.|.theStat|
|00001730| 65 20 3a 3d 20 48 47 65 | 74 53 74 61 74 65 28 48 |e := HGe|tState(H|
|00001740| 61 6e 64 6c 65 28 68 54 | 65 72 6d 29 29 3b 0d 09 |andle(hT|erm));..|
|00001750| 48 4c 6f 63 6b 28 48 61 | 6e 64 6c 65 28 68 54 65 |HLock(Ha|ndle(hTe|
|00001760| 72 6d 29 29 3b 0d 09 70 | 50 72 69 76 61 74 65 20 |rm));..p|Private |
|00001770| 3a 3d 20 54 45 52 4d 49 | 4e 41 4c 50 72 69 76 61 |:= TERMI|NALPriva|
|00001780| 74 65 50 74 72 28 68 54 | 65 72 6d 5e 5e 2e 74 6d |tePtr(hT|erm^^.tm|
|00001790| 50 72 69 76 61 74 65 29 | 3b 0d 09 70 43 6f 6e 66 |Private)|;..pConf|
|000017a0| 69 67 20 3a 3d 20 54 65 | 72 6d 69 6e 61 6c 50 74 |ig := Te|rminalPt|
|000017b0| 72 28 68 54 65 72 6d 5e | 5e 2e 63 6f 6e 66 69 67 |r(hTerm^|^.config|
|000017c0| 29 3b 0d 09 74 68 65 50 | 72 6f 63 49 44 20 3a 3d |);..theP|rocID :=|
|000017d0| 20 28 68 54 65 72 6d 5e | 5e 2e 70 72 6f 63 49 44 | (hTerm^|^.procID|
|000017e0| 29 3b 0d 09 49 46 20 28 | 74 68 65 50 72 6f 63 49 |);..IF (|theProcI|
|000017f0| 44 20 3c 20 33 29 20 4f | 52 20 28 70 43 6f 6e 66 |D < 3) O|R (pConf|
|00001800| 69 67 20 3d 20 4e 49 4c | 29 20 4f 52 20 28 70 50 |ig = NIL|) OR (pP|
|00001810| 72 69 76 61 74 65 20 3d | 20 4e 49 4c 29 20 54 48 |rivate =| NIL) TH|
|00001820| 45 4e 0d 09 09 44 65 62 | 75 67 53 74 72 28 27 54 |EN...Deb|ugStr('T|
|00001830| 68 65 20 70 69 70 65 20 | 69 73 20 62 6c 6f 63 6b |he pipe |is block|
|00001840| 65 64 20 66 72 6f 6d 20 | 54 65 72 6d 54 6f 6f 6c |ed from |TermTool|
|00001850| 52 65 73 65 74 27 29 3b | 0d 09 48 53 65 74 53 74 |Reset');|..HSetSt|
|00001860| 61 74 65 28 48 61 6e 64 | 6c 65 28 68 54 65 72 6d |ate(Hand|le(hTerm|
|00001870| 29 2c 20 74 68 65 53 74 | 61 74 65 29 3b 0d 45 4e |), theSt|ate);.EN|
|00001880| 44 3b 0d 0d 0d 50 52 4f | 43 45 44 55 52 45 20 54 |D;...PRO|CEDURE T|
|00001890| 65 72 6d 54 6f 6f 6c 4b | 65 79 28 68 54 65 72 6d |ermToolK|ey(hTerm|
|000018a0| 3a 20 54 65 72 6d 48 61 | 6e 64 6c 65 3b 20 70 45 |: TermHa|ndle; pE|
|000018b0| 76 65 6e 74 3a 20 45 76 | 65 6e 74 50 74 72 29 3b |vent: Ev|entPtr);|
|000018c0| 0d 56 41 52 0d 09 74 68 | 65 53 74 61 74 65 3a 20 |.VAR..th|eState: |
|000018d0| 53 69 67 6e 65 64 42 79 | 74 65 3b 0d 09 70 50 72 |SignedBy|te;..pPr|
|000018e0| 69 76 61 74 65 3a 20 54 | 45 52 4d 49 4e 41 4c 50 |ivate: T|ERMINALP|
|000018f0| 72 69 76 61 74 65 50 74 | 72 3b 0d 09 70 43 6f 6e |rivatePt|r;..pCon|
|00001900| 66 69 67 3a 20 54 65 72 | 6d 69 6e 61 6c 50 74 72 |fig: Ter|minalPtr|
|00001910| 3b 0d 09 74 68 65 50 72 | 6f 63 49 44 3a 20 49 6e |;..thePr|ocID: In|
|00001920| 74 65 67 65 72 3b 0d 42 | 45 47 49 4e 0d 09 74 68 |teger;.B|EGIN..th|
|00001930| 65 53 74 61 74 65 20 3a | 3d 20 48 47 65 74 53 74 |eState :|= HGetSt|
|00001940| 61 74 65 28 48 61 6e 64 | 6c 65 28 68 54 65 72 6d |ate(Hand|le(hTerm|
|00001950| 29 29 3b 0d 09 48 4c 6f | 63 6b 28 48 61 6e 64 6c |));..HLo|ck(Handl|
|00001960| 65 28 68 54 65 72 6d 29 | 29 3b 0d 09 70 50 72 69 |e(hTerm)|);..pPri|
|00001970| 76 61 74 65 20 3a 3d 20 | 54 45 52 4d 49 4e 41 4c |vate := |TERMINAL|
|00001980| 50 72 69 76 61 74 65 50 | 74 72 28 68 54 65 72 6d |PrivateP|tr(hTerm|
|00001990| 5e 5e 2e 74 6d 50 72 69 | 76 61 74 65 29 3b 0d 09 |^^.tmPri|vate);..|
|000019a0| 70 43 6f 6e 66 69 67 20 | 3a 3d 20 54 65 72 6d 69 |pConfig |:= Termi|
|000019b0| 6e 61 6c 50 74 72 28 68 | 54 65 72 6d 5e 5e 2e 63 |nalPtr(h|Term^^.c|
|000019c0| 6f 6e 66 69 67 29 3b 0d | 09 74 68 65 50 72 6f 63 |onfig);.|.theProc|
|000019d0| 49 44 20 3a 3d 20 28 68 | 54 65 72 6d 5e 5e 2e 70 |ID := (h|Term^^.p|
|000019e0| 72 6f 63 49 44 29 3b 0d | 09 49 46 20 28 74 68 65 |rocID);.|.IF (the|
|000019f0| 50 72 6f 63 49 44 20 3c | 20 33 29 20 4f 52 20 28 |ProcID <| 3) OR (|
|00001a00| 70 43 6f 6e 66 69 67 20 | 3d 20 4e 49 4c 29 20 4f |pConfig |= NIL) O|
|00001a10| 52 20 28 70 50 72 69 76 | 61 74 65 20 3d 20 4e 49 |R (pPriv|ate = NI|
|00001a20| 4c 29 20 54 48 45 4e 0d | 09 09 44 65 62 75 67 53 |L) THEN.|..DebugS|
|00001a30| 74 72 28 27 54 68 65 20 | 70 69 70 65 20 69 73 20 |tr('The |pipe is |
|00001a40| 62 6c 6f 63 6b 65 64 20 | 66 72 6f 6d 20 54 65 72 |blocked |from Ter|
|00001a50| 6d 54 6f 6f 6c 4b 65 79 | 27 29 3b 0d 09 48 53 65 |mToolKey|');..HSe|
|00001a60| 74 53 74 61 74 65 28 48 | 61 6e 64 6c 65 28 68 54 |tState(H|andle(hT|
|00001a70| 65 72 6d 29 2c 20 74 68 | 65 53 74 61 74 65 29 3b |erm), th|eState);|
|00001a80| 0d 45 4e 44 3b 0d 0d 0d | 46 55 4e 43 54 49 4f 4e |.END;...|FUNCTION|
|00001a90| 0d 09 54 65 72 6d 54 6f | 6f 6c 53 74 72 65 61 6d |..TermTo|olStream|
|00001aa0| 28 68 54 65 72 6d 3a 20 | 54 65 72 6d 48 61 6e 64 |(hTerm: |TermHand|
|00001ab0| 6c 65 3b 20 70 42 75 66 | 66 65 72 3a 20 43 68 61 |le; pBuf|fer: Cha|
|00001ac0| 72 50 74 72 3b 0d 09 09 | 74 68 65 42 75 66 66 65 |rPtr;...|theBuffe|
|00001ad0| 72 53 69 7a 65 3a 20 49 | 6e 74 65 67 65 72 29 3a |rSize: I|nteger):|
|00001ae0| 20 4c 6f 6e 67 49 6e 74 | 3b 0d 56 41 52 0d 09 74 | LongInt|;.VAR..t|
|00001af0| 68 65 53 74 61 74 65 3a | 20 53 69 67 6e 65 64 42 |heState:| SignedB|
|00001b00| 79 74 65 3b 0d 09 70 50 | 72 69 76 61 74 65 3a 20 |yte;..pP|rivate: |
|00001b10| 54 45 52 4d 49 4e 41 4c | 50 72 69 76 61 74 65 50 |TERMINAL|PrivateP|
|00001b20| 74 72 3b 0d 09 70 43 6f | 6e 66 69 67 3a 20 54 65 |tr;..pCo|nfig: Te|
|00001b30| 72 6d 69 6e 61 6c 50 74 | 72 3b 0d 09 74 68 65 50 |rminalPt|r;..theP|
|00001b40| 72 6f 63 49 44 3a 20 49 | 6e 74 65 67 65 72 3b 0d |rocID: I|nteger;.|
|00001b50| 42 45 47 49 4e 0d 09 74 | 68 65 53 74 61 74 65 20 |BEGIN..t|heState |
|00001b60| 3a 3d 20 48 47 65 74 53 | 74 61 74 65 28 48 61 6e |:= HGetS|tate(Han|
|00001b70| 64 6c 65 28 68 54 65 72 | 6d 29 29 3b 0d 09 48 4c |dle(hTer|m));..HL|
|00001b80| 6f 63 6b 28 48 61 6e 64 | 6c 65 28 68 54 65 72 6d |ock(Hand|le(hTerm|
|00001b90| 29 29 3b 0d 09 70 50 72 | 69 76 61 74 65 20 3a 3d |));..pPr|ivate :=|
|00001ba0| 20 54 45 52 4d 49 4e 41 | 4c 50 72 69 76 61 74 65 | TERMINA|LPrivate|
|00001bb0| 50 74 72 28 68 54 65 72 | 6d 5e 5e 2e 74 6d 50 72 |Ptr(hTer|m^^.tmPr|
|00001bc0| 69 76 61 74 65 29 3b 0d | 09 70 43 6f 6e 66 69 67 |ivate);.|.pConfig|
|00001bd0| 20 3a 3d 20 54 65 72 6d | 69 6e 61 6c 50 74 72 28 | := Term|inalPtr(|
|00001be0| 68 54 65 72 6d 5e 5e 2e | 63 6f 6e 66 69 67 29 3b |hTerm^^.|config);|
|00001bf0| 0d 09 74 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..t.....|........|
+--------+-------------------------+-------------------------+--------+--------+